#ifndef __CENTITY_H__
#define __CENTITY_H__
#include "CEntity.h"
#include "..\Includes\Precision.h"
#include "..\Includes\IEntity.h"
#include "CVector3.h"
namespace Core
{
class CEntity : public IEntity
{
public:
	
	CEntity(float posX,float posY,float posZ);
	virtual void createBoundingBox(float a, float b,float c);
  virtual void createBoundingSphere(float r);
  virtual void getOrientation(float& yaw, float& pitch, float& roll);
  virtual void getPosition(float& x, float& y, float& z);
  virtual void setPosition(float,float,float); 
  virtual void moveVector(const float x, const float y, const float z);
  virtual void addForce(const float x, const float y, const float z);
  void applyGravity(float dT);
  float getPosX();
  float getPosY();
  float getPosZ();
  void addForce(const Vector3 & force);
  bool hasFiniteMass();
  real getMass();
  void integrate(real deltaT);

private:
  void cleareAccumulator();
  float boxA,boxB,boxC;
  float sphereRadius;
  real inverseMass;
  real mass;
  Vector3 position;
  Vector3 forceAccum;
  Vector3 velocity;
  Vector3 acceleration;
};
}
#endif